package org.minbox.framework.microservice.openfeign;

import org.minbox.framework.microservice.common.entity.GoodsInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 商品服务OpenFeign接口定义
 *
 */
@FeignClient(name = "goods-service")
@RequestMapping(value = "/goods")
public interface GoodsServiceClient {
    /**
     * 查询商品基本信息
     *
     * @param goodsId 商品编号 {@link GoodsInfo#getId()}
     * @return {@link GoodsInfo}
     */
    @GetMapping(value = "/{goodsId}")
    GoodsInfo findById(@PathVariable Integer goodsId);
}
